package com.itheima.mapper;

import com.itheima.pojo.EmpExpr;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmpExprMapper {

    @Insert("insert into emp_expr(emp_id, begin, end, company, job) VALUES (#{empId},#{begin},#{end},#{company},#{job})")
    void insert(EmpExpr empExpr);

    @Delete("delete from emp_expr where emp_id = #{empId}")
    void deleteByEmpId(Integer empId);

    @Select("select * from emp_expr where emp_id = #{empId}")
    List<EmpExpr> getByEmpId(Integer empId);
}
